Flattens a 2D array into a new collection. The items are copied row by row.
Example usage:
boolean[][] array = [[true, false], [true, false]] assert array.flatten() == [true, false, true, false]
A transpose method for 2D boolean arrays.
Example usage:
boolean[][] array = [[false, false], [true, true]] boolean[][] expected = [[false, true], [false, true]] def result = array.transpose() assert result == expected assert array.class.componentType == result.class.componentType